﻿using ProTrack.Entity;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace ProTrack.IServices.Device
{
    /// <summary>
    /// 设备台账业务逻辑层接口
    /// </summary>
    public interface IMachineryServices
    {
        /// <summary>
        /// 获取所有设备信息
        /// </summary>
        /// <returns></returns>
        public Task<IEnumerable<Machinery>> GetAllAsync();
        /// <summary>
        /// 根据页码，页大小，设备所属分类名称，设备编码，设备名称，设备状态，设备所属分类Id获取设备信息
        /// </summary>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页大小</param>
        /// <param name="MachineryTypeName">设备所属分类名称</param>
        /// <param name="MachineryCode">设备编码</param>
        /// <param name="MachineryName">设备名称</param>
        /// <param name="Status">设备状态</param>
        /// <param name="MachineryTypeId">设备所属分类Id</param>
        /// <returns></returns>
        public Task<IEnumerable<Machinery>> GetAsync(int PageIndex, int PageSize,string MachineryTypeName,string MachineryCode,string MachineryName,string Status,int MachineryTypeId);
        /// <summary>
        /// 根据设备所属分类名称，设备编码，设备名称，设备状态，设备所属分类Id获取设备数量
        /// </summary>
        /// <param name="MachineryTypeName">设备所属分类名称</param>
        /// <param name="MachineryCode">设备编码</param>
        /// <param name="MachineryName">设备名称</param>
        /// <param name="Status">设备状态</param>
        /// <param name="MachineryTypeId">设备所属分类Id</param>
        /// <returns></returns>
        public Task<int> GetCountAsync(string MachineryTypeName, string MachineryCode, string MachineryName, string Status,int MachineryTypeId);
        /// <summary>
        /// 更新设备信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> UpdateAsync(Machinery model);
        /// <summary>
        /// 新增设备
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> AddAsync(Machinery model);
        /// <summary>
        /// 批量删除设备
        /// </summary>
        /// <param name="Ids"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int[] Ids);
        /// <summary>
        /// 删除指定设备
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int Id);
    }
}
